<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/cms/cmsmb.js"></script>
	</head>
	<body>
		<!-- 表格 -->
		<table id="cmsmbTable" title="部门管理" border="0" cellspacing="0" cellpadding="0" iconCls="icon-tip" width="98%" idField="mbaa" pagination="true" remoteSort="false" singleSelect="false" showFooter="false" striped="true" url="<c:url value='/cmsmb/cmsmbList.xhtml'/>">
			<thead>
				<tr align="center">
					<th field="mbaa" width="100">编号</th>
					<th field="mbab" width="100">名称</th>
					<th field="mbac" width="150">备注</th>
				</tr>
			</thead>
		</table>
		<div id="cmsmbSearch" class="easyui-window" title="查询" style="padding:5px;width:250px;height:200px;" iconCls="icon-search" closed="true" maximizable="false" minimizable="false" collapsible="true">
			<form method="post" name="searchForm" id="searchForm">
				<div class="ToolTip_Form" id="cmsmbSearchForm" onkeydown="if(event.keyCode==13){searchCmsmb();}">
					<table>
						<tr>
							<td align="right">编号:</td>
							<td align="left"><input type="text" name="mbaa" id="searchMbaa" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td align="right">名称:</td>
							<td align="left"><input type="text" name="mbab" id="searchMbab" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td colspan="2" align="center"><a class="easyui-linkbutton" iconCls="icon-search" href="javascript:void(0);" onclick="searchCmsmb()">查询</a></td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 添加 -->
		<div id="cmsmbAdd" icon="icon-save" style="padding:5px;width:450px;height:400px;">
			<form method="post" name="addForm" id="addForm">
				<div class="ToolTip_Form" id="cmsmbAddForm" onkeydown="if(event.keyCode==13){cmsmbAdd();}">
					<table>
						<tr>
							<td align="right">编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmbAddMbaa" name="mbaa" maxlength="20" required="true" validType="sieralNumber" missingMessage="编号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmbAddMbab" name="mbab" maxlength="20" required="true" validType="length[1,20]" missingMessage="名称不能为空!"  invalidMessage="名称不能超过20个字!"/></td>
						</tr>
						<tr>
							<td align="right">描述：</td>
							<td align="left"><textarea class="easyui-validatebox" id="cmsmbAddMbac" name="mbac" validType="length[0,72]" invalidMessage="描述不能超过72个字!"></textarea></td>
						</tr>
						<tr>
							<td colspan="2">
								<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
									<tr bgcolor="#EEEEEE">
										<th width="4%" align="center" height="30"><input type="checkbox" name="checkalladd" id="checkalladd"/></th>
										<th width="8%">ID</th>
										<th width="25%">名称</th>
										<th width="8%">父ID</th>
										<th width="25%">路径</th>
										<th width="25%">描述</th>
									</tr>
									<c:if test="${allCmsmeList != null}">
										<c:forEach var="item" items="${allCmsmeList}" varStatus="num">
											<tr bgcolor="#FFFFFF">
												<td class="alt">
													<input type="checkbox" name="meaaAdd" value="${item.meaa}"/>
												</td>
												<td class="alt">${item.meaa}</td>
												<td class="alt">${item.meab}</td>
												<td class="alt">${item.meac}</td>
												<td class="alt">${item.mead}</td>
												<td class="alt">${item.meae}</td>
											</tr>
										</c:forEach>
									</c:if>
								</table>
							</td>
						</tr>
						<tr>
							<td align="center" colspan="2">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmbAdd();">提交</a>&nbsp;&nbsp;&nbsp;
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmbAddReset();">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="cmsmbUpdate" icon="icon-edit" style="padding:5px;width:450px;height:400px;">
			<form method="post" name="updateForm" id="updateForm">
				<div class="ToolTip_Form" id="cmsmbUpdateForm" onkeydown="if(event.keyCode==13){cmsmbUpdate();}">
					<input type="hidden" id="cmsmbInfoUpdateMbaa" name="mbaa" value=""/>
					<table>
						<tr>
							<td align="right">编号：</td>
							<td align="left"><span id="cmsmbUpdateMbaa"></span></td>
						</tr>
						<tr>
							<td align="right">名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmbUpdateMbab" name="mbab" maxlength="20" required="true" validType="length[1,20]" missingMessage="名称不能为空!"   invalidMessage="名称不能超过20个字!"/></td>
						</tr>
						<tr>
							<td align="right">描述：</td>
							<td align="left"><textarea class="easyui-validatebox" id="cmsmbUpdateMbac" name="mbac" validType="length[0,72]" invalidMessage="描述不能超过72个字!"></textarea></td>
						</tr>
						<tr>
							<td colspan="2">
								<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
									<tr bgcolor="#EEEEEE">
										<th width="4%" align="center" height="30"><input type="checkbox" name="checkallupdate" id="checkallupdate"/></th>
										<th width="8%">ID</th>
										<th width="25%">名称</th>
										<th width="8%">父ID</th>
										<th width="25%">路径</th>
										<th width="25%">描述</th>
									</tr>
									<c:if test="${allCmsmeList != null}">
										<c:forEach var="item" items="${allCmsmeList}" varStatus="num">
											<tr bgcolor="#FFFFFF">
												<td class="alt">
													<input type="checkbox" name="meaaUpdate" value="${item.meaa}"/>
												</td>
												<td class="alt">${item.meaa}</td>
												<td class="alt">${item.meab}</td>
												<td class="alt">${item.meac}</td>
												<td class="alt">${item.mead}</td>
												<td class="alt">${item.meae}</td>
											</tr>
										</c:forEach>
									</c:if>
								</table>
							</td>
						</tr>
						<tr>
							<td align="center" colspan="2">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmbUpdate();">提交</a>&nbsp;&nbsp;&nbsp;
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmbUpdateReset(items[0],items[1],items[2]);">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</body>
</html>